/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package filenetapis.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author mawad
 */
public class Util {

    public static String getPropertyValue(String name) {

        Properties prop = new Properties();
        String propFileName = "config.properties";
        try {
            InputStream inputStream = Util.class.getClassLoader().getResourceAsStream(propFileName);

            if (inputStream != null) {

                prop.load(inputStream);

            }

        } catch (IOException ex) {
            Logger.getLogger(Util.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(Util.class.getName()).log(Level.SEVERE, null, ex);
        }

        return prop.getProperty(name);
    }

    public static void main(String[] args) {
        System.out.println(getPropertyValue("CEURI"));

    }
}
